import {axios} from '@/utils/request'

export function save(parameter) {
  return axios({
    url: '/face/merchant/addOrUpdate',
    method: 'post',
    params: parameter
  })
}


export function addMerchantReceiver(parameter) { //新增分账账户
  return axios({
    url: '/face/merchant/addMerchantReceiver',
    method: 'post',
    params: parameter
  })
}

export function delMerchantReceiver(parameter) { //删除分账账户
  return axios({
    url: '/face/merchant/delMerchantReceiver',
    method: 'post',
    params: parameter
  })
}

export function del(parameter) {
  return axios({
    url: '/face/merchant/delete/' + parameter,
    method: 'get'
  })
}

export function bind(parameter) {
  return axios({
    url: '/face/merchant/bindGzhAndXcx/' + parameter,
    method: 'get'
  })
}

export function selectPage(parameter) {
  return axios({
    url: '/face/merchant/selectList/' + parameter.pageNum + "/" + parameter.pageSize,
    method: 'post',
    data: parameter
  })
}

export function deletePic(parameter) { //删除图片
  return axios({
    url: '/common/upload/deletePic?name=' + parameter,
    method: 'get'
  })
}

export function selectAll(parameter) {
  return axios({
    url: '/face/merchant/selectAll',
    method: 'get'
  })
}

export function selectList(parameter) { //分账账户列表
  return axios({
    url: '/face/receiver/selectList/' + parameter.pageNum + "/" + parameter.pageSize,
    method: 'post',
    data: parameter
  })
}

export function selectReceiverById(parameter) {
  return axios({
    url: '/face/merchant/selectReceiverById/' + parameter,
    method: 'get'
  })
}

export function serviceAll(parameter) {
  return axios({
    url: '/face/receiver/selectAll',
    method: 'get'
  })
}